package org.apache.flink;

import org.apache.flink.configuration.Configuration;
import org.apache.flink.endpoint.TaskExecutorRpcEndpoint;
import org.apache.flink.runtime.rpc.RpcService;
import org.apache.flink.runtime.rpc.RpcSystem;
import org.apache.flink.shaded.curator5.org.apache.curator.framework.CuratorFramework;

public class TaskExecutor {

    private CuratorFramework client;

    public static void main(String[] args) throws Exception {
        System.out.println("TaskExecutor start");

        Configuration configuration = new Configuration();
        RpcSystem rpcSystem = RpcSystem.load(configuration);
        RpcService rpcService = rpcSystem.remoteServiceBuilder(configuration, "127.0.0.1", "9003")
                .createAndStart();


        TaskExecutorRpcEndpoint taskExecutorRpcEndpoint = new TaskExecutorRpcEndpoint(rpcService, "tm");
        taskExecutorRpcEndpoint.start();

    }
}
